/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.proyectofinal.ramas.service;

import com.proyectofinal.ramas.domain.Company;
import java.util.Collection;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

/**
 *
 * @author nicolas
 */
public class UserImpl extends User{
    
   private Company company;

   UserImpl(   String username, 
                String password, 
                boolean enabled,
                boolean accountNonExpired, 
                boolean credentialsNonExpired,
                boolean accountNonLocked,
                Collection<GrantedAuthority> authorities, 
                Company company) {
                            super(  username,
                                    password, 
                                    enabled, 
                                    accountNonExpired,
                                    credentialsNonExpired, 
                                    accountNonLocked, 
                                    authorities);

      this.company = company;
   }

    public Company getCompany() {
        return this.company;
    }
    
     public void setCompany(Company company) {
        this.company = company;
    }
    
}
